package com.qfedu.tantu.controller;

import com.qfedu.tantu.entity.Attractions;
import com.qfedu.tantu.service.intf.AttractionsService;
import com.qfedu.tantu.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 * |                     ______                     |
 * |                  .-"      "-.                  |
 * |                 /            \                 |
 * |     _          |              |          _     |
 * |    ( \         |,  .-.  .-.  ,|         / )    |
 * |     > "=._     | )(__/  \__)( |     _.=" <     |
 * |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |
 * |           "=._"(_     ^^     _)"_.="           |
 * |               "=\__|IIIIII|__/="               |
 * |              _.="| \IIIIII/ |"=._              |
 * |    _     _.="_.="\          /"=._"=._     _    |
 * |   ( \_.="_.="     `--------`     "=._"=._/ )   |
 * |    > _.="                            "=._ <    |
 * |   (_/                                    \_)   |
 * |                                                |
 * '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
 * -----------------代码的搬运工-----------------
 *
 * @Date: 2022/07/01/18:54
 */
@RestController
@RequestMapping("api/attractions/")
@Api(value = "景点表的相关操作")
@CrossOrigin
public class AttractionsController {
    @Resource
    private AttractionsService service;
    @PostMapping("selectbycity.do")
    @ApiOperation("通过城市查询景点")
    public R selectBycity(@RequestBody Attractions attractions){
        return service.selectBycity(attractions);
    }
    @GetMapping("selectIndex.do")
    public R indexSelect(){
        return service.indexQuery();
    };
    @GetMapping("selectById.do")
    public R selectById(int id){
        return service.selectByid(id);
    }
}
